package cn.wen.yinxiu.member.service;

import cn.wen.yinxiu.common.to.system.SearchHistoryTO;
import cn.wen.yinxiu.member.vo.SearchHistoryVO;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.wen.yinxiu.common.toolkit.PageUtils;
import cn.wen.yinxiu.member.entity.SearchHistoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 
 *
 * @ClassName: SearchHistoryService
 * @Author 小飞
 * @Email coderwen22@163.com
 * @Date 2023-05-21 22:19:26
 * @Description:
 */
public interface SearchHistoryService extends IService<SearchHistoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取查询记录
     *
     * @param userId
     * @param browserId
     * @return
     */
    List<SearchHistoryVO> getSearchHistory(Long userId, String browserId);

    /**
     * 删除查询记录
     *
     * @param searchHistoryId
     * @return
     */
    boolean deleteSearchHistory(Long searchHistoryId);

    /**
     * 清除查询记录
     *
     * @param userId
     * @return
     */
    boolean clearSearchHistory(Long userId, String browserId);

    /**
     * 添加查询记录
     *
     * @param searchHistoryTO
     * @return
     */
    boolean addSearchHistory(SearchHistoryTO searchHistoryTO);
}

